﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta chaiset="uft-8">
    <title>viewer</title>
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/icamera/icamera.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            if (typeof (window.localStorage) == undefined) {
                console.log("not support web storage!");
                return;
            }

            var storage = window.localStorage;
            for (var i = 0; i < storage.length; i++) {
                var imageBase64 = storage[storage.key(i)];
                var htmlCode = "<img src=" + imageBase64 + " style='width:320px;'  />";
                $("#td_content").prepend(htmlCode);
            }
        })

        window.addEventListener("storage", addView, true);
        function addView(e) {
            var imageBase64 = e.newValue;
            var htmlCode = "<img src=" + imageBase64 + " style='width:320px;'  />";
            $("#td_content").prepend(htmlCode);
        }

    </script>
</head>
<body>
    <div id="td_content" style="width: 100%;">
    </div>
</body>
</html>
